from django.conf.urls import url

from urlTest import views

urlpatterns = [
    # 最后加个$，表示到这里结尾
    url(r'^students/$', views.students),
    # /（\d+）/表示：//中的参数为实数
    url(r'^students/(\d+)/', views.student),

    url(r'^grades/', views.grades),

    url(r'^grades_student/(\d+)/', views.get_students),

    url(r'^get_time/(\d+)/(\d+)/(\d+)/', views.get_time, name='get_time'),

    # 根据名称定位，默认根据位置定位
    url(r'^get_date/(?P<year>\d+)/(?P<month>\d+)/(?P<day>\d+)/', views.get_date, name='get_date'),

    url(r'^learn/', views.learn, name='learn'),

    url(r'^have_request/$', views.have_request),

    url(r'^create_student/$', views.create_student),

    url(r'^do_create_student/$', views.do_create_student, name='do_create_student'),

    url(r'^do_response/$', views.do_response, name='do_response'),

    url(r'do_redirect/$', views.do_redirect, name='do_redirect'),

    url(r'do_json/$', views.do_json, name='do_json'),

    url(r'setcookie/$', views.setcookie, name='setcookie'),

    url(r'getcookie/$', views.getcookie, name='getcookie'),

    url(r'^login/$', views.login, name='login'),

    url(r'^dologin/$', views.dologin, name='dologin'),

    url(r'^main/$', views.main, name='main'),

    url(r'do_json/$', views.do_json, name='do_json'),

    url(r'logout/$',views.logout,name = 'logout'),
]
